﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CROSLAND.BL.BE;
using CROSLAND.DL.DALCF;

namespace CROSLAND.BL.BC
{
    public class PersonaBC
    {
        #region Singleton Members
        private PersonaBC() { }
        private static PersonaBC _instance = null;
        public static PersonaBC Instance
        {
            get { return (_instance == null) ? _instance = new PersonaBC() : _instance; }
        }
        #endregion

        public List<PersonaBE> listarVendedores()
        {
            return DaoFactory.PersonaDALC.listarVendedores();
        }

        public List<PersonaBE> listarProfesionales(string pNombre)
        {
            return DaoFactory.PersonaDALC.listarProfesionales(pNombre);
        }

        public PersonaBE leer(string pCodPersona)
        {
            return DaoFactory.PersonaDALC.leer(pCodPersona.PadLeft(8, '0'));
        }

        public void getInfoUsuario(string pCodPersona, out string pCodOfVtas, out string pCodGrupoVend)
        {
            DaoFactory.PersonaDALC.getInfoUsuario(pCodPersona.PadLeft(8, '0'), out pCodOfVtas, out pCodGrupoVend);
        }
    }
}
